package com.kjj.basic.util;

import com.kjj.org.domain.Employee;
import com.kjj.org.domain.Shop;
import com.kjj.org.mapper.EmployeeMapper;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 登录上下文，放入缓存
 */
public class LoginContext {

    @Autowired
    private EmployeeMapper employeeMapper;
    public static void setLoginUser(Employee loginUser){
        //暂时不实现
    }
    public static Employee getLoginUser(){
        //从session或者redis获取
        Employee employee = new Employee();
        employee.setId(337L);
        employee.setUsername("kjj");
        employee.setPassword("123");
        employee.setEmail("kjj@qq.com");
        employee.setAge(18);
        Shop shop = new Shop();
        shop.setId(40L);
        shop.setName("温江涌泉容车宝旗舰店");
        employee.setShop(shop);
        return employee;
    }
}
